{SetA_West} - {SetB_East}{SW_Name}
View Slow Way');
var slowways = sw.plot(map, 'grey', 0.5, "(SetA_West <> 'SY99 8AL' and SetB_East <> 'SY99 8AL' ) and Life_Cycle='Live' ", 0);
const focus = new Settlement(accessToken, surl, '
{Settlement}
View routes from {Settlement}');
var f = focus.plot(map, '#A101BC', '#8000D0', 0.4, "LifeCycle='Live' and (Settlement = 'Shrewsbury' or Settlement = 'Newport (Telford and Wrekin)' )", 1);
const c = new Settlement(accessToken, surl, '
{Settlement}
View routes from {Settlement}');
var cities = c.plot(map, '#A101BC', '#8000D0', 0.4, "LifeCycle='Live'", 0);
var citieson = c.plot(map, '#8000D0', '#8000D0', 1, "Settlement ='Shrewsbury' or Settlement='Newport (Telford and Wrekin)'", 1);
const r = new Route(accessToken, rurl, '
{SetA_West} - {SetB_East}
{SW_Name_1_}
View Route Details
Suggest a better route
Download route (.gpx)
Open in OS maps
Print (via Inkatlas)
');
var routes = r.plot(map, '#50D000', 1, "UniqueCode <> 4243 and UniqueCode <> 10490", 0);
var overlays = {
"Routes": routes,
"Slow Ways": slowways,
"Settlements": cities,
};
mapsObj.setLayers(map, overlays);
/* fit bounds on slowways found */
var query = L.esri.query({
url: rurl
});
query.where("UniqueCode = 4243 or UniqueCode = 10490").bounds(function(error, latLngBounds, response) {
if (error) {
console.log(error);
return;
}
map.fitBounds(latLngBounds.pad(0.5));
var centerPoint = map.getSize().divideBy(2);
targetPoint = centerPoint.subtract([100, 0]);
targetLatLng = map.containerPointToLatLng(targetPoint);
map.panTo(targetLatLng);
new L.control.scale({
position: 'bottomright',
imperial: false,
maxWidth: 150
}).addTo(map);
mapsObj.addMiniMap(map);
});
var un_verified_query_string = "UniqueCode = 4243 or UniqueCode = 10490";
var verified_query_string = "";
if (un_verified_query_string != '') {
r.plot(map, '#009565', 1, un_verified_query_string, 1);
}
if (verified_query_string != '') {
r.plot(map, '#8000d0', 1, verified_query_string, 1);
}